//
//  InheritViewController.swift
//  SwiftLearnAll
//
//  Created by iosdev1 on 2017/6/20.
//  Copyright © 2017年 ygsoft. All rights reserved.
//

import UIKit

class InheritViewController: ProtocolAndBlockViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
//        这个继承主要是看是否能继承上个控制器的代理方法
        print("继承")



//        let arrBtn = ["btn1", "btn2"]

//        for i in 0 ..< arrBtn.count {
//            let btn = ZyUIButton.shared(title: arrBtn[i], font: 14, color: UIColor.white, bgcolor: UIColor.black, radius: 5, btnClosure: { (btns:UIButton) in
//                print("\(String(describing: btns.currentTitle))")
//            })
//            self.view.addSubview(btn)
//            btn.frame = CGRect(x:200, y:(60 + 100 * i), width:100, height:40)
//        }


        let btn = ZyUIButton.shared(title: "探究中", font: 14, color: UIColor.white, bgcolor: UIColor.black, radius: 5, btnClosure: { (btns:UIButton) in
            print("\(String(describing: btns.currentTitle))")
        })
        self.view.addSubview(btn)
        btn.frame = CGRect(x:200, y:(60 + 100), width:100, height:40)
    }

//    override func btnProtocolClick(btn: UIButton) {
//        print("......")
//    }
    
    override func protocolDelegateFuncOne(val: String) {
        print("可以继承上个控制器的代理方法继承，相当于重写了，上个代理方法不执行\n 除非用super调用")
        super.protocolDelegateFuncOne(val: val)
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
